﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Fitts__law_experiment_with_a_wiimote
{
	public partial class Experiment1DVR : Fitts__law_experiment_with_a_wiimote.ExperimentForm
	{
		private Random rand = new Random();
		public Experiment1DVR()
		{
			InitializeComponent();
			SetExperiment(new Experiment("Random vertical movement", PrimaryButton, SecondaryButton));
		}

		private void Experiment1DVR_Load(object sender, EventArgs e)
		{
			
		}

		protected override void onMousePrimaryButtonClick()
		{
			SecondaryButton.Width = rand.Next(75, 225);
			SecondaryButton.Height = rand.Next(75, 225);

			SecondaryButton.Top = rand.Next(this.Height / 2, this.Height - SecondaryButton.Height - 25);
		}

		protected override void onMouseSecondaryButtonClick()
		{
			PrimaryButton.Width = rand.Next(75, 225);
			PrimaryButton.Height = rand.Next(75, 225);

			PrimaryButton.Top = rand.Next(0, this.Height / 2 - PrimaryButton.Height - 25);
		}

		protected override void onProceedExperiment()
		{
			dontExit = true;
			Close();
			Experiment2D form = new Experiment2D();
			form.Show();
		}
	}
}
